package com.fyh.crud.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Data
@Entity
@Table(name="user")
public class UserEntity {
    @ApiModelProperty(value ="主键")
    @Column
    private int userId;
    @ApiModelProperty(value ="名称")
    @Column
    private String name;
    @ApiModelProperty(value ="用户名")
    @Column
    private String userName;
    @ApiModelProperty(value ="密码")
    @Column
    private String password;
    @ApiModelProperty(value ="禁用/启用")
    @Column
    private int disabled;
    @ApiModelProperty(value = "创建时间",dataType = "java.util.date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date creationTime;
    @ApiModelProperty(value ="盐")
    @Column
    private String salt;


}
